<?php

namespace App\Exports\Sheet;

use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;

class OneSheetExport implements WithMultipleSheets
{
    use Exportable;
    private $type;

    public function __construct(string $type)
    {
        $this->type = $type;
    }

    /**
     * @return array
     */
    public function sheets(): array
    {
        if ($this->type === 'demo-export') return [new DemoSheet];
        else return [];
    }
}
